<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
//信用卡管理表
class Fund_model extends CI_Model{
    function __construct() {
        parent::__construct();
        $this->fund = 'funds';
    }
    
    function get($where){
        $this->db->select($this->fund.'.*');
        $this->db->from($this->fund);
        $this->db->where($where);
        $this->db->order_by('id desc');
        $query = $this->db->get();
        return $query->row_array(); 
    }
    
    function get_list($where,$page,$limit){
        $this->db->select($this->fund.'.*');
        $this->db->from($this->fund);
        $this->db->where($where);
        $this->db->limit($limit, $page);
        $this->db->order_by('sort desc');
        $query = $this->db->get();
        return $query->result_array(); 
    }
}
